Skip to content

Adding Abhishek.java File #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fanaticabhi
Copy link

No description provided.

@@ -0,0 +1,50 @@
import java.util.*;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please import specific classes instead of import the whole package.

import java.io.*;

class pattern
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please properly format your code, indentation is not correct.

}

int k=0,count=0;
for(int i=0;i<n;i++){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

create a separate method to get the output.

int k=0,count=0;
for(int i=0;i<n;i++){
Pattern p1=Pattern.compile(arr[i]);
Matcher m = p1.matcher(s);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please give some meaningful names to variables. p1, m doesn't make any sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants